// installation as we don't want it to muck with the --list tests
fn new_path() -> Vec<Path> {
let path = os::getenv_as_bytes("PATH").unwrap_or(Vec::new());
- os::split_paths(path).move_iter().filter(|p| {
+ os::split_paths(path).into_iter().filter(|p| {
!p.join(format!("cargo{}", os::consts::EXE_SUFFIX)).exists()
}).collect()
}
// as well, and then fail b/c they're a directory. As a stopgap, we just
// ignore all submodules.
let mut s = repo.submodules().unwrap();
- for submodule in s.mut_iter() {
+ for submodule in s.iter_mut() {
submodule.add_to_index(false).unwrap();
}
let mut index = repo.index().unwrap();
}).assert();
let repo = git2::Repository::open(&bar.root()).unwrap();
- let rev1 = repo.revparse_single("HEAD").unwrap().id().to_string();
+ let rev1 = repo.revparse_single("HEAD").unwrap().id();
// Commit the changes and make sure we trigger a recompile
File::create(&bar.root().join("src/lib.rs")).write_str(r#"
pub fn bar() -> int { 2 }
"#).assert();
add(&repo);
- let rev2 = commit(&repo).to_string();
+ let rev2 = commit(&repo);
let foo = project("foo")
.file("Cargo.toml", format!(r#"
[dependencies.baz]
path = "../baz"
- "#, bar.url(), rev1.as_slice().trim()).as_slice())
+ "#, bar.url(), rev1).as_slice())
.file("src/main.rs", r#"
extern crate bar;
extern crate baz;
[dependencies.bar]
git = '{}'
rev = "{}"
- "#, bar.url(), rev2.as_slice().trim()).as_slice())
+ "#, bar.url(), rev2).as_slice())
.file("src/lib.rs", r#"
extern crate bar;
pub fn baz() -> int { bar::bar() }